<template>
    <el-radio-group v-model="model" @change="changed">
    <el-radio
            v-for="(item,index) in list"
            :label="item.value"
            :key="index"
            :disabled="disabled"
    >{{item.label}}</el-radio>
    </el-radio-group>
</template>
<script>
    export default {
        name: 'XDRadio',
        props: ['value', 'net', 'list', 'disabled'],
        data() {
            return {
                model: '',
            }
        },
        created() {
            this.model = this.value
        },
        methods: {
            changed() {
                this.$emit('input', this.model)
            }
        },
        watch: {
            value: function () {
                this.model = this.value
            }
        }
    }
</script>